package org.csu.mypetstore.persistence;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.csu.mypetstore.domain.Item;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface ItemMapper extends BaseMapper<Item> {
    Item selectItemById(String itemId);
    int selectInventoryQuantity(String itemId);
    List<Item> selectItemsByProductId(String productId);


    void updateInventory(String itemId, int quantity);
    void deleteItem(String itemId);
    void updateItem(Item item);
    void insertItem(Item item);

    Item getItem(String itemId);

}
